package com.gmd.model;

import java.io.Serializable;
import javax.persistence.*;

import java.util.Date;
import java.util.Set;


/**
 * The persistent class for the historiaclinica database table.
 * 
 */
@Entity
@Table(name="historiaclinica")
@NamedQueries({
	@NamedQuery(name="getLastIdHisto", query="SELECT MAX(o.idhistoriaclinica) FROM Historiaclinica o"),
	@NamedQuery(name="findAllHisto", query="SELECT o FROM Historiaclinica o"),
	@NamedQuery(name="findByNroDocHisto", query="SELECT o FROM Historiaclinica o WHERE o.nrodoc = :nrodoc")
})
public class Historiaclinica implements Serializable {
	private static final long serialVersionUID = 1L;
	private int idhistoriaclinica;
	private String acompanante;
	private String apemat;
	private String apepat;
	private int celular;
	private String direccion;
	private String estacivil;
	private Date fechape;
	private Date fechingreso;
	private Date fecnac;
	private String gradoinstruccion;
	private String nombres;
	private String nrodoc;
	private String ocupacion;
	private String sexo;
	private String tipodoc;
	private int tlfacompanante;
	private int tlfcasa;
	private Set<Cita> citas;
	private Set<Consultamedica> consultamedicas;
	private Set<Recetamedica> recetamedicas;
	private Set<Signovital> signovitals;

	public Historiaclinica() {
	}


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(unique=true, nullable=false)
	public int getIdhistoriaclinica() {
		return this.idhistoriaclinica;
	}

	public void setIdhistoriaclinica(int idhistoriaclinica) {
		this.idhistoriaclinica = idhistoriaclinica;
	}


	@Column(length=250)
	public String getAcompanante() {
		return this.acompanante;
	}

	public void setAcompanante(String acompanante) {
		this.acompanante = acompanante;
	}


	@Column(length=200)
	public String getApemat() {
		return this.apemat;
	}

	public void setApemat(String apemat) {
		this.apemat = apemat;
	}


	@Column(length=200)
	public String getApepat() {
		return this.apepat;
	}

	public void setApepat(String apepat) {
		this.apepat = apepat;
	}


	public int getCelular() {
		return this.celular;
	}

	public void setCelular(int celular) {
		this.celular = celular;
	}


	@Column(length=50)
	public String getDireccion() {
		return this.direccion;
	}

	public void setDireccion(String direccion) {
		this.direccion = direccion;
	}


	@Column(length=20)
	public String getEstacivil() {
		return this.estacivil;
	}

	public void setEstacivil(String estacivil) {
		this.estacivil = estacivil;
	}


	@Temporal(TemporalType.DATE)
	public Date getFechape() {
		return this.fechape;
	}

	public void setFechape(Date fechape) {
		this.fechape = fechape;
	}


	@Temporal(TemporalType.DATE)
	public Date getFechingreso() {
		return this.fechingreso;
	}

	public void setFechingreso(Date fechingreso) {
		this.fechingreso = fechingreso;
	}


	@Temporal(TemporalType.DATE)
	public Date getFecnac() {
		return this.fecnac;
	}

	public void setFecnac(Date fecnac) {
		this.fecnac = fecnac;
	}


	@Column(length=50)
	public String getGradoinstruccion() {
		return this.gradoinstruccion;
	}

	public void setGradoinstruccion(String gradoinstruccion) {
		this.gradoinstruccion = gradoinstruccion;
	}


	@Column(length=200)
	public String getNombres() {
		return this.nombres;
	}

	public void setNombres(String nombres) {
		this.nombres = nombres;
	}


	@Column(length=15)
	public String getNrodoc() {
		return this.nrodoc;
	}

	public void setNrodoc(String nrodoc) {
		this.nrodoc = nrodoc;
	}


	@Column(length=40)
	public String getOcupacion() {
		return this.ocupacion;
	}

	public void setOcupacion(String ocupacion) {
		this.ocupacion = ocupacion;
	}


	@Column(length=45)
	public String getSexo() {
		return this.sexo;
	}

	public void setSexo(String sexo) {
		this.sexo = sexo;
	}


	@Column(length=45)
	public String getTipodoc() {
		return this.tipodoc;
	}

	public void setTipodoc(String tipodoc) {
		this.tipodoc = tipodoc;
	}


	public int getTlfacompanante() {
		return this.tlfacompanante;
	}

	public void setTlfacompanante(int tlfacompanante) {
		this.tlfacompanante = tlfacompanante;
	}


	public int getTlfcasa() {
		return this.tlfcasa;
	}

	public void setTlfcasa(int tlfcasa) {
		this.tlfcasa = tlfcasa;
	}


	//bi-directional many-to-one association to Cita
	@OneToMany(mappedBy="historiaclinica")
	public Set<Cita> getCitas() {
		return this.citas;
	}

	public void setCitas(Set<Cita> citas) {
		this.citas = citas;
	}


	//bi-directional many-to-one association to Consultamedica
	@OneToMany(mappedBy="historiaclinica")
	public Set<Consultamedica> getConsultamedicas() {
		return this.consultamedicas;
	}

	public void setConsultamedicas(Set<Consultamedica> consultamedicas) {
		this.consultamedicas = consultamedicas;
	}


	//bi-directional many-to-one association to Recetamedica
	@OneToMany(mappedBy="historiaclinica")
	public Set<Recetamedica> getRecetamedicas() {
		return this.recetamedicas;
	}

	public void setRecetamedicas(Set<Recetamedica> recetamedicas) {
		this.recetamedicas = recetamedicas;
	}


	//bi-directional many-to-one association to Signovital
	@OneToMany(mappedBy="historiaclinica")
	public Set<Signovital> getSignovitals() {
		return this.signovitals;
	}

	public void setSignovitals(Set<Signovital> signovitals) {
		this.signovitals = signovitals;
	}

}